package spi;


import java.util.Iterator;
import java.util.ServiceLoader;



/**
 * @Author: admin
 * @Description:
 * @Date: 2018/10/25 15:33
 */

public class TestMain {
    public static void main(String[] args) {
        ServiceLoader<Teacher> teachers=ServiceLoader.load(Teacher.class);
        Iterator<Teacher> iterator=teachers.iterator();
        while (iterator.hasNext()){
            Teacher teacher=iterator.next();
            teacher.question();
        }
    }
}
